package com.ruoyi.optionLog.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.optionLog.mapper.TbOptionLogMapper;
import com.ruoyi.optionLog.domain.TbOptionLog;
import com.ruoyi.optionLog.service.ITbOptionLogService;

/**
 * 操作日志Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-04
 */
@Service
public class TbOptionLogServiceImpl implements ITbOptionLogService 
{
    @Autowired
    private TbOptionLogMapper tbOptionLogMapper;

    /**
     * 查询操作日志
     * 
     * @param id 操作日志主键
     * @return 操作日志
     */
    @Override
    public TbOptionLog selectTbOptionLogById(String id)
    {
        return tbOptionLogMapper.selectTbOptionLogById(id);
    }

    /**
     * 查询操作日志列表
     * 
     * @param tbOptionLog 操作日志
     * @return 操作日志
     */
    @Override
    public List<TbOptionLog> selectTbOptionLogList(TbOptionLog tbOptionLog)
    {
        return tbOptionLogMapper.selectTbOptionLogList(tbOptionLog);
    }

    /**
     * 新增操作日志
     * 
     * @param tbOptionLog 操作日志
     * @return 结果
     */
    @Override
    public int insertTbOptionLog(TbOptionLog tbOptionLog)
    {
        tbOptionLog.setCreateTime(DateUtils.getNowDate());
        return tbOptionLogMapper.insertTbOptionLog(tbOptionLog);
    }

    /**
     * 修改操作日志
     * 
     * @param tbOptionLog 操作日志
     * @return 结果
     */
    @Override
    public int updateTbOptionLog(TbOptionLog tbOptionLog)
    {
        return tbOptionLogMapper.updateTbOptionLog(tbOptionLog);
    }

    /**
     * 批量删除操作日志
     * 
     * @param ids 需要删除的操作日志主键
     * @return 结果
     */
    @Override
    public int deleteTbOptionLogByIds(String[] ids)
    {
        return tbOptionLogMapper.deleteTbOptionLogByIds(ids);
    }

    /**
     * 删除操作日志信息
     * 
     * @param id 操作日志主键
     * @return 结果
     */
    @Override
    public int deleteTbOptionLogById(String id)
    {
        return tbOptionLogMapper.deleteTbOptionLogById(id);
    }
}
